﻿using TianShu.Domain;
using TianShu.Service.Dtos;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace TianShu.Service.Contracts.Service.Crud
{
    public interface IQueryService<TListDto> : IService
        where TListDto : IEntityDto
    {
        /// <summary>
        /// 根据url参数查询
        /// </summary>
        /// <param name="urlParams"></param>
        /// <returns></returns>
        Task<PageResultDto<IEnumerable<TListDto>>> GetUrlParamAsync(List<UrlParams> urlParams);
    }
    public interface IQueryService<TListDto, TDetail, TKey> : IQueryService<TListDto>
        where TListDto : IEntityDto
    {
        /// <summary>
        /// 根据Id获取数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<PageResultDto<TDetail>> GetByIdAsync(TKey id);
    }
    public interface IQueryService<TListDto, TKey> : IQueryService<TListDto, TListDto, TKey>
        where TListDto : IEntityDto
    {
    }
}
